package javaHomework;

public class Circle {
    private double r;
    public  Circle(double r){
        this.r=r;
    }

    public double getR() {
        return r;
    }
    public double area(){
        return Math.PI*r*r;
    }
    public double circuference(){
        return Math.PI*r*2;
    }

    public static void main(String[] args) {
        Circle cir=new Circle(5.0);
        System.out.println("面积是："+cir.area());
        System.out.println("周长是："+cir.circuference());

    }
}
